﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CaptureImageMergeSys
{
    public partial class ImagePanel : Form
    {
        public ImagePanel()
        {
            InitializeComponent();
            this.TopLevel = false;
            LoadInputImagePanel();
            LoadOutputImageWnd();
        }
        private void LoadOutputImageWnd()
        {
            m_wndOutputImage = new OutputImageWnd();
            OutputImagePanel.Controls.Add(m_wndOutputImage);
            m_wndOutputImage.Dock = System.Windows.Forms.DockStyle.Fill;
            m_wndOutputImage.Show();
        }
        void LoadInputImagePanel()
        {
            InputImageWndsplitContainer1.SplitterDistance = this.Width / 2;
            m_wndInputImageA = new InputImageWnd();
            this.InputImageWndsplitContainer1.PerformLayout();
            this.InputImageWndsplitContainer1.Panel1.Controls.Add(m_wndInputImageA);
            m_wndInputImageA.Dock = System.Windows.Forms.DockStyle.Fill;
            m_wndInputImageA.Show();
            m_wndInputImageB = new InputImageWnd();
            m_wndInputImageB.Dock = System.Windows.Forms.DockStyle.Fill;
            this.InputImageWndsplitContainer1.Panel2.Controls.Add(m_wndInputImageB);
            m_wndInputImageB.Show();
        }

        private InputImageWnd m_wndInputImageA;
        private InputImageWnd m_wndInputImageB;
        private OutputImageWnd m_wndOutputImage;

        private void ImagePanel_Resize(object sender, EventArgs e)
        {
            InputImageWndsplitContainer1.SuspendLayout();
            InputImageWndsplitContainer1.SplitterDistance = this.Width / 2;
            InputImageWndsplitContainer1.Width = this.Width - 28;
            InputImageWndsplitContainer1.ResumeLayout();
            this.InputImageBPrompt.Location = new System.Drawing.Point(this.Width / 2 + 14, this.InputImageBPrompt.Location.Y);
            OutputImagePanel.Location = new System.Drawing.Point(InputImageWndsplitContainer1.Location.X, OutputImagePanel.Location.Y);
            OutputImagePanel.Width = InputImageWndsplitContainer1.Width;
            InputImageWndsplitContainer1.SplitterDistance = this.Width / 2;

        }

        private void ImagePanel_Resize_1(object sender, EventArgs e)
        {
            ImagePanel_Resize(sender, e);
        }
    }
}
